<?php include_partial('partecipa/campagna_short', array('campagna' => $campagna, 'nAdesioni' => $nAdesioni, 'showLink' => 'nick')); ?>

<div id="commenti" class="box">

  <?php include_partial('global/title', array('title' => "Commenti")) ?>
  
  <?php if($commenti->getNbResults() > 0):?>
  
    <ul id="comment-list">

      <?php foreach ($commenti->getResults() as $i => $commento): ?>
        <li>
          <div class="data"><?php echo $commento->getCreatedAt("d-m-Y H:i:s")?></div>
          <div class="nick"><?php echo $commento->getNick()?></div>
          <div class="commento"><?php echo $commento->getComment();?></div>
        </li>
      <?php endforeach; ?>

    </ul>
  
  <?php else: ?>

    <div ><?php echo __("Nessun commento");?></div>

  <?php endif ?>

  <div id="paginazione"><?php include_partial('global/simple_pagination', array('route' => 'partecipa', 'pager' => $commenti, 'page' => $commenti->getPage(), 'querystringValues' => 'id=' . $campagna->getId() . '&slug=' . Cuv::slugify($campagna->getName()))) ?></div>
</div>

